'use strict';

const db = uniCloud.database()
const _table = 'banner';

exports.main = async (event, context) => {
	switch (event.cloudAction) {
		case 'getList':
			var collection = db.collection(_table)
			var row = await collection.get({
				getCount: true, //如需查询数据总条数
			})
			console.log('row', row)
			return row
			break;
	}
};
